﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YunSpace.Core.Extend;

namespace YunSpace.Domain.ViewModel.Topic
{
    /// <summary>
    /// 资讯模型
    /// </summary>
    public class ArticleDto
    {
        /// <summary>
        /// 资讯id
        /// </summary>
        public string Id { get; set; }

        public string Space { get; set; }
        public string SpaceId { get; set; }

        /// <summary>
        /// 资讯标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 资讯类型
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// 所属栏目
        /// </summary>
        public string Class { get; set; }

        /// <summary>
        /// 资讯来源
        /// </summary>
        public string Source { get; set; }

        /// <summary>
        /// 资讯显示时间
        /// </summary>
        public string Time { get; set; }

        /// <summary>
        /// 是否首页推荐
        /// </summary>
        public bool? IsHomeRecommend { get; set; }

        public string IsHomeRecommendDesc => IsHomeRecommend.ToChinese();


        /// <summary>
        /// 审核状态
        /// </summary>
        public int? State { get; set; }

        public string StateDesc
        {
            get
            {
                switch (State)
                {
                    case null:
                        return "下线";
                    case -1:
                        return "删除";
                    case 0:
                        return "下线";
                    case 1:
                        return "上线";
                }

                return "下线";
            }
        }

        /// <summary>
        /// 是否热门推荐
        /// </summary>
        public bool? IsHot { get; set; }

        public string IsHotDesc => IsHot.ToChinese();

        /// <summary>
        /// 推荐城市
        /// </summary>
        public string RecommendCity { get; set; }

        /// <summary>
        /// 是否专题
        /// </summary>
        public bool? IsSpecial { get; set; }

        public string IsSpecialDesc => IsSpecial.ToChinese();

        public string F_FirstPicture { get; set; }
    }
}
